package com.vrp3d.service.impl;

import com.vrp3d.domain.dto.dist.DistForFrontDTO;
import com.vrp3d.domain.po.DistWithBLOBs;
import com.vrp3d.mapper.DistMapper;
import com.vrp3d.service.DistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 字典
 *
 * @author vrp3d
 */
@Service
public class DistServiceImpl extends AbsServiceImpl implements DistService {

    @Autowired
    private DistMapper distMapper;

    @Override
    public List<DistForFrontDTO> findListByTypeContainsSubordinates(String type) {
        return distMapper.findListByTypeContainsSubordinates(type, getNormalStatus());
    }

    @Override
    public DistWithBLOBs selectByPrimaryKey(Integer id) {
        // 重写了selectByPrimaryKey方法,status=1
        return distMapper.selectByPrimaryKey(id);
    }
}
